package com.myself.common.page

import com.fasterxml.jackson.annotation.JsonAlias

data class PageResult<T> (
    val total: Int,  // 总记录数
    val records: List<T>,  // 当前页数据
    val size: Int,  // 每页记录数
    val current: Int,  // 当前页码
    val totalPages: Int  // 总页数
)

data class Page(
    @JsonAlias("page")
    val current: Int = 1,  // 当前页
    val size: Int = 10 ,   // 每页记录数
    val orders: List<Any> = emptyList(),
    val id :Int?
){
    constructor(current: Int, size: Int) : this(current, size, emptyList(), null)
}